{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8500fb03",
   "metadata": {},
   "source": [
    "## 作业"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "78488b2e",
   "metadata": {},
   "source": [
    "### 随机数生成六个班的考试成绩，3门考试：Python、数学、语文。每个班50人"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "id": "52ba2164",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[79,  4, 42],\n",
       "        [26, 85, 79],\n",
       "        [29, 88, 52],\n",
       "        [30, 75, 91],\n",
       "        [67, 32, 73],\n",
       "        [18, 65, 45],\n",
       "        [90, 18, 46],\n",
       "        [51, 39, 89],\n",
       "        [91, 62, 32],\n",
       "        [14, 57, 94],\n",
       "        [66, 90, 14],\n",
       "        [16, 57, 41],\n",
       "        [62, 42, 17],\n",
       "        [12, 22, 15],\n",
       "        [69, 46, 60],\n",
       "        [22, 37, 62],\n",
       "        [85, 36, 89],\n",
       "        [10, 87, 17],\n",
       "        [78, 88, 87],\n",
       "        [80, 70, 54],\n",
       "        [73, 41, 48],\n",
       "        [72, 79, 59],\n",
       "        [ 8, 56, 65],\n",
       "        [85, 53, 22],\n",
       "        [23, 80, 46],\n",
       "        [75, 92, 52],\n",
       "        [82, 98, 77],\n",
       "        [ 0, 47, 98],\n",
       "        [41, 37, 37],\n",
       "        [11, 88, 12],\n",
       "        [18, 14, 65],\n",
       "        [ 6, 34, 41],\n",
       "        [72, 80, 35],\n",
       "        [23, 49, 35],\n",
       "        [42, 25, 24],\n",
       "        [21, 17,  8],\n",
       "        [43, 47, 31],\n",
       "        [26, 53, 47],\n",
       "        [59, 47, 28],\n",
       "        [25, 74, 38],\n",
       "        [ 3, 99, 59],\n",
       "        [ 4, 67, 96],\n",
       "        [58,  4, 83],\n",
       "        [92, 49, 56],\n",
       "        [26, 14, 43],\n",
       "        [14, 70,  3],\n",
       "        [65, 37, 10],\n",
       "        [62, 11,  1],\n",
       "        [74, 43, 97],\n",
       "        [19, 78, 64]],\n",
       "\n",
       "       [[68, 40, 36],\n",
       "        [75, 80,  5],\n",
       "        [65, 76, 41],\n",
       "        [89, 14, 96],\n",
       "        [19, 95, 86],\n",
       "        [53,  3,  0],\n",
       "        [21, 80,  7],\n",
       "        [84, 24, 96],\n",
       "        [95, 85, 51],\n",
       "        [13, 60, 30],\n",
       "        [93, 27, 16],\n",
       "        [29, 54,  3],\n",
       "        [26, 12, 45],\n",
       "        [18,  6, 99],\n",
       "        [84, 95, 33],\n",
       "        [32, 22, 26],\n",
       "        [ 0, 41, 87],\n",
       "        [64, 51, 68],\n",
       "        [51, 40, 57],\n",
       "        [41, 63, 87],\n",
       "        [97, 16,  7],\n",
       "        [ 2, 34, 84],\n",
       "        [41, 21, 79],\n",
       "        [67, 75, 34],\n",
       "        [14, 17, 97],\n",
       "        [26, 34, 40],\n",
       "        [33, 31, 73],\n",
       "        [69, 16, 27],\n",
       "        [40, 39, 29],\n",
       "        [21, 15, 77],\n",
       "        [42, 96, 84],\n",
       "        [15, 71, 96],\n",
       "        [61, 47, 35],\n",
       "        [38, 55, 53],\n",
       "        [54, 57, 53],\n",
       "        [16, 52, 96],\n",
       "        [91,  9, 27],\n",
       "        [84, 20, 88],\n",
       "        [75, 16, 24],\n",
       "        [82, 15, 67],\n",
       "        [78, 61, 51],\n",
       "        [35, 44, 17],\n",
       "        [75, 36, 78],\n",
       "        [58, 68,  5],\n",
       "        [ 1, 70, 40],\n",
       "        [95, 31, 17],\n",
       "        [ 6, 58, 60],\n",
       "        [25, 59, 63],\n",
       "        [ 7, 16, 93],\n",
       "        [22, 97, 97]],\n",
       "\n",
       "       [[ 1, 50, 31],\n",
       "        [ 5, 96, 98],\n",
       "        [ 1, 34, 54],\n",
       "        [81, 84, 57],\n",
       "        [37, 74, 36],\n",
       "        [85, 22, 89],\n",
       "        [12, 51, 17],\n",
       "        [ 0, 25, 33],\n",
       "        [16, 22, 53],\n",
       "        [ 2, 68,  8],\n",
       "        [61, 87, 77],\n",
       "        [83, 20,  6],\n",
       "        [22, 10, 30],\n",
       "        [65, 24, 20],\n",
       "        [54, 12, 44],\n",
       "        [30, 75, 29],\n",
       "        [73, 12, 79],\n",
       "        [36, 88, 29],\n",
       "        [99, 14, 57],\n",
       "        [69, 22, 16],\n",
       "        [77, 89, 40],\n",
       "        [64, 41, 54],\n",
       "        [49, 87, 36],\n",
       "        [99, 64, 52],\n",
       "        [83, 14, 52],\n",
       "        [11, 90, 95],\n",
       "        [13, 39, 81],\n",
       "        [94, 58,  7],\n",
       "        [34, 40,  5],\n",
       "        [89,  6, 97],\n",
       "        [ 4, 40, 59],\n",
       "        [75, 83, 63],\n",
       "        [91, 32, 92],\n",
       "        [64, 74, 34],\n",
       "        [70, 89, 42],\n",
       "        [41, 31, 12],\n",
       "        [56, 14, 57],\n",
       "        [96, 51,  4],\n",
       "        [75, 56, 91],\n",
       "        [48, 45, 22],\n",
       "        [55, 84, 53],\n",
       "        [80, 50, 60],\n",
       "        [10, 12, 85],\n",
       "        [ 0, 70, 12],\n",
       "        [71, 39, 11],\n",
       "        [35, 42, 22],\n",
       "        [62, 21, 73],\n",
       "        [24, 84, 77],\n",
       "        [79, 52, 14],\n",
       "        [43,  0,  6]],\n",
       "\n",
       "       [[17, 71, 33],\n",
       "        [45, 98,  2],\n",
       "        [ 1, 80, 67],\n",
       "        [68, 48, 74],\n",
       "        [33, 25, 61],\n",
       "        [ 0, 33, 24],\n",
       "        [53, 34,  9],\n",
       "        [98,  6, 63],\n",
       "        [69, 88, 98],\n",
       "        [90, 59, 35],\n",
       "        [53, 35, 65],\n",
       "        [18, 91,  3],\n",
       "        [13, 54, 53],\n",
       "        [50, 90, 46],\n",
       "        [76, 80, 58],\n",
       "        [87, 98, 58],\n",
       "        [16, 89, 96],\n",
       "        [ 6, 44, 65],\n",
       "        [56,  0, 73],\n",
       "        [87, 69, 24],\n",
       "        [22, 55, 37],\n",
       "        [21, 75, 31],\n",
       "        [19, 27, 56],\n",
       "        [38, 82, 32],\n",
       "        [90, 40, 67],\n",
       "        [54, 66, 11],\n",
       "        [28, 86, 79],\n",
       "        [40, 68, 93],\n",
       "        [44, 90,  5],\n",
       "        [53,  9, 23],\n",
       "        [85, 62, 46],\n",
       "        [48, 94, 27],\n",
       "        [ 4, 84, 15],\n",
       "        [ 2, 64, 44],\n",
       "        [77, 35, 78],\n",
       "        [85,  3, 84],\n",
       "        [12, 18, 32],\n",
       "        [48, 88,  5],\n",
       "        [99,  6, 86],\n",
       "        [38,  0, 61],\n",
       "        [26,  4, 48],\n",
       "        [50, 50, 12],\n",
       "        [66, 73, 33],\n",
       "        [55, 10,  0],\n",
       "        [87, 94, 94],\n",
       "        [88, 71, 62],\n",
       "        [29,  5, 59],\n",
       "        [ 4,  6, 87],\n",
       "        [ 0, 67, 84],\n",
       "        [73, 17, 63]],\n",
       "\n",
       "       [[57, 79, 79],\n",
       "        [29, 91, 29],\n",
       "        [22,  5, 21],\n",
       "        [33, 64, 43],\n",
       "        [38, 95, 35],\n",
       "        [83, 66, 18],\n",
       "        [15, 58, 71],\n",
       "        [23, 73, 88],\n",
       "        [78, 32, 55],\n",
       "        [29,  6,  4],\n",
       "        [18, 63, 30],\n",
       "        [19,  3, 15],\n",
       "        [68, 93, 19],\n",
       "        [34, 12, 82],\n",
       "        [ 2, 95, 81],\n",
       "        [51, 42, 14],\n",
       "        [ 8, 37, 83],\n",
       "        [41, 65, 88],\n",
       "        [89, 87, 88],\n",
       "        [87, 56,  0],\n",
       "        [20, 21, 80],\n",
       "        [86, 22, 54],\n",
       "        [49, 98, 97],\n",
       "        [86, 72, 36],\n",
       "        [54, 22, 57],\n",
       "        [48, 39,  8],\n",
       "        [ 5, 23, 21],\n",
       "        [90, 94, 32],\n",
       "        [26,  4, 67],\n",
       "        [39, 96, 97],\n",
       "        [65, 87, 13],\n",
       "        [88, 84, 17],\n",
       "        [27, 58, 35],\n",
       "        [30, 91, 28],\n",
       "        [32, 82, 80],\n",
       "        [50, 80, 86],\n",
       "        [29, 41, 10],\n",
       "        [92, 61, 58],\n",
       "        [79, 24, 69],\n",
       "        [34,  4, 61],\n",
       "        [24, 75,  3],\n",
       "        [22, 64, 15],\n",
       "        [17, 87, 53],\n",
       "        [27, 35, 81],\n",
       "        [12, 66, 51],\n",
       "        [53, 53, 29],\n",
       "        [86, 90, 46],\n",
       "        [72, 62, 63],\n",
       "        [98, 71, 24],\n",
       "        [40, 37, 69]],\n",
       "\n",
       "       [[98, 10, 86],\n",
       "        [41, 56,  7],\n",
       "        [58, 88, 92],\n",
       "        [20,  5, 22],\n",
       "        [14, 79, 11],\n",
       "        [81, 98, 31],\n",
       "        [35, 69, 50],\n",
       "        [79, 58, 24],\n",
       "        [74, 69, 65],\n",
       "        [16, 66, 23],\n",
       "        [19, 68, 95],\n",
       "        [52, 11, 43],\n",
       "        [66,  3, 49],\n",
       "        [ 6, 28, 23],\n",
       "        [18, 28, 30],\n",
       "        [76, 32,  8],\n",
       "        [59, 52, 91],\n",
       "        [36, 75, 14],\n",
       "        [87, 93, 77],\n",
       "        [96, 28, 71],\n",
       "        [75, 91, 69],\n",
       "        [86, 42,  5],\n",
       "        [26, 20, 94],\n",
       "        [27, 49, 82],\n",
       "        [56, 59, 10],\n",
       "        [44, 14, 80],\n",
       "        [83, 10, 40],\n",
       "        [49, 85, 88],\n",
       "        [74, 94, 79],\n",
       "        [13, 41, 52],\n",
       "        [75, 22, 80],\n",
       "        [39, 35, 59],\n",
       "        [55, 79, 84],\n",
       "        [15, 49, 27],\n",
       "        [27, 45, 20],\n",
       "        [41, 71, 18],\n",
       "        [78, 48, 52],\n",
       "        [43, 97, 69],\n",
       "        [32, 19, 96],\n",
       "        [14, 59, 73],\n",
       "        [20,  6, 52],\n",
       "        [70, 61, 45],\n",
       "        [71, 88, 54],\n",
       "        [80, 20, 53],\n",
       "        [97, 62, 45],\n",
       "        [83, 31, 59],\n",
       "        [72, 41, 25],\n",
       "        [32, 89, 38],\n",
       "        [56, 75, 73],\n",
       "        [23,  9, 45]]])"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = np.random.randint(0,100,size=(6,50,3))\n",
    "a"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2ea014bd",
   "metadata": {},
   "source": [
    "### 将六个班的考试成绩进行合并得到score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 378,
   "id": "9a90315c",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[79],\n",
       "        [26],\n",
       "        [29],\n",
       "        [30],\n",
       "        [67],\n",
       "        [18],\n",
       "        [90],\n",
       "        [51],\n",
       "        [91],\n",
       "        [14],\n",
       "        [66],\n",
       "        [16],\n",
       "        [62],\n",
       "        [12],\n",
       "        [69],\n",
       "        [22],\n",
       "        [85],\n",
       "        [10],\n",
       "        [78],\n",
       "        [80],\n",
       "        [73],\n",
       "        [72],\n",
       "        [ 8],\n",
       "        [85],\n",
       "        [23],\n",
       "        [75],\n",
       "        [82],\n",
       "        [ 0],\n",
       "        [41],\n",
       "        [11],\n",
       "        [18],\n",
       "        [ 6],\n",
       "        [72],\n",
       "        [23],\n",
       "        [42],\n",
       "        [21],\n",
       "        [43],\n",
       "        [26],\n",
       "        [59],\n",
       "        [25],\n",
       "        [ 3],\n",
       "        [ 4],\n",
       "        [58],\n",
       "        [92],\n",
       "        [26],\n",
       "        [14],\n",
       "        [65],\n",
       "        [62],\n",
       "        [74],\n",
       "        [19]],\n",
       "\n",
       "       [[68],\n",
       "        [75],\n",
       "        [65],\n",
       "        [89],\n",
       "        [19],\n",
       "        [53],\n",
       "        [21],\n",
       "        [84],\n",
       "        [95],\n",
       "        [13],\n",
       "        [93],\n",
       "        [29],\n",
       "        [26],\n",
       "        [18],\n",
       "        [84],\n",
       "        [32],\n",
       "        [ 0],\n",
       "        [64],\n",
       "        [51],\n",
       "        [41],\n",
       "        [97],\n",
       "        [ 2],\n",
       "        [41],\n",
       "        [67],\n",
       "        [14],\n",
       "        [26],\n",
       "        [33],\n",
       "        [69],\n",
       "        [40],\n",
       "        [21],\n",
       "        [42],\n",
       "        [15],\n",
       "        [61],\n",
       "        [38],\n",
       "        [54],\n",
       "        [16],\n",
       "        [91],\n",
       "        [84],\n",
       "        [75],\n",
       "        [82],\n",
       "        [78],\n",
       "        [35],\n",
       "        [75],\n",
       "        [58],\n",
       "        [ 1],\n",
       "        [95],\n",
       "        [ 6],\n",
       "        [25],\n",
       "        [ 7],\n",
       "        [22]],\n",
       "\n",
       "       [[ 1],\n",
       "        [ 5],\n",
       "        [ 1],\n",
       "        [81],\n",
       "        [37],\n",
       "        [85],\n",
       "        [12],\n",
       "        [ 0],\n",
       "        [16],\n",
       "        [ 2],\n",
       "        [61],\n",
       "        [83],\n",
       "        [22],\n",
       "        [65],\n",
       "        [54],\n",
       "        [30],\n",
       "        [73],\n",
       "        [36],\n",
       "        [99],\n",
       "        [69],\n",
       "        [77],\n",
       "        [64],\n",
       "        [49],\n",
       "        [99],\n",
       "        [83],\n",
       "        [11],\n",
       "        [13],\n",
       "        [94],\n",
       "        [34],\n",
       "        [89],\n",
       "        [ 4],\n",
       "        [75],\n",
       "        [91],\n",
       "        [64],\n",
       "        [70],\n",
       "        [41],\n",
       "        [56],\n",
       "        [96],\n",
       "        [75],\n",
       "        [48],\n",
       "        [55],\n",
       "        [80],\n",
       "        [10],\n",
       "        [ 0],\n",
       "        [71],\n",
       "        [35],\n",
       "        [62],\n",
       "        [24],\n",
       "        [79],\n",
       "        [43]],\n",
       "\n",
       "       [[17],\n",
       "        [45],\n",
       "        [ 1],\n",
       "        [68],\n",
       "        [33],\n",
       "        [ 0],\n",
       "        [53],\n",
       "        [98],\n",
       "        [69],\n",
       "        [90],\n",
       "        [53],\n",
       "        [18],\n",
       "        [13],\n",
       "        [50],\n",
       "        [76],\n",
       "        [87],\n",
       "        [16],\n",
       "        [ 6],\n",
       "        [56],\n",
       "        [87],\n",
       "        [22],\n",
       "        [21],\n",
       "        [19],\n",
       "        [38],\n",
       "        [90],\n",
       "        [54],\n",
       "        [28],\n",
       "        [40],\n",
       "        [44],\n",
       "        [53],\n",
       "        [85],\n",
       "        [48],\n",
       "        [ 4],\n",
       "        [ 2],\n",
       "        [77],\n",
       "        [85],\n",
       "        [12],\n",
       "        [48],\n",
       "        [99],\n",
       "        [38],\n",
       "        [26],\n",
       "        [50],\n",
       "        [66],\n",
       "        [55],\n",
       "        [87],\n",
       "        [88],\n",
       "        [29],\n",
       "        [ 4],\n",
       "        [ 0],\n",
       "        [73]],\n",
       "\n",
       "       [[57],\n",
       "        [29],\n",
       "        [22],\n",
       "        [33],\n",
       "        [38],\n",
       "        [83],\n",
       "        [15],\n",
       "        [23],\n",
       "        [78],\n",
       "        [29],\n",
       "        [18],\n",
       "        [19],\n",
       "        [68],\n",
       "        [34],\n",
       "        [ 2],\n",
       "        [51],\n",
       "        [ 8],\n",
       "        [41],\n",
       "        [89],\n",
       "        [87],\n",
       "        [20],\n",
       "        [86],\n",
       "        [49],\n",
       "        [86],\n",
       "        [54],\n",
       "        [48],\n",
       "        [ 5],\n",
       "        [90],\n",
       "        [26],\n",
       "        [39],\n",
       "        [65],\n",
       "        [88],\n",
       "        [27],\n",
       "        [30],\n",
       "        [32],\n",
       "        [50],\n",
       "        [29],\n",
       "        [92],\n",
       "        [79],\n",
       "        [34],\n",
       "        [24],\n",
       "        [22],\n",
       "        [17],\n",
       "        [27],\n",
       "        [12],\n",
       "        [53],\n",
       "        [86],\n",
       "        [72],\n",
       "        [98],\n",
       "        [40]],\n",
       "\n",
       "       [[98],\n",
       "        [41],\n",
       "        [58],\n",
       "        [20],\n",
       "        [14],\n",
       "        [81],\n",
       "        [35],\n",
       "        [79],\n",
       "        [74],\n",
       "        [16],\n",
       "        [19],\n",
       "        [52],\n",
       "        [66],\n",
       "        [ 6],\n",
       "        [18],\n",
       "        [76],\n",
       "        [59],\n",
       "        [36],\n",
       "        [87],\n",
       "        [96],\n",
       "        [75],\n",
       "        [86],\n",
       "        [26],\n",
       "        [27],\n",
       "        [56],\n",
       "        [44],\n",
       "        [83],\n",
       "        [49],\n",
       "        [74],\n",
       "        [13],\n",
       "        [75],\n",
       "        [39],\n",
       "        [55],\n",
       "        [15],\n",
       "        [27],\n",
       "        [41],\n",
       "        [78],\n",
       "        [43],\n",
       "        [32],\n",
       "        [14],\n",
       "        [20],\n",
       "        [70],\n",
       "        [71],\n",
       "        [80],\n",
       "        [97],\n",
       "        [83],\n",
       "        [72],\n",
       "        [32],\n",
       "        [56],\n",
       "        [23]]])"
      ]
     },
     "execution_count": 378,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array(a[:,:,[0]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "id": "64973683",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[ 4],\n",
       "        [85],\n",
       "        [88],\n",
       "        [75],\n",
       "        [32],\n",
       "        [65],\n",
       "        [18],\n",
       "        [39],\n",
       "        [62],\n",
       "        [57],\n",
       "        [90],\n",
       "        [57],\n",
       "        [42],\n",
       "        [22],\n",
       "        [46],\n",
       "        [37],\n",
       "        [36],\n",
       "        [87],\n",
       "        [88],\n",
       "        [70],\n",
       "        [41],\n",
       "        [79],\n",
       "        [56],\n",
       "        [53],\n",
       "        [80],\n",
       "        [92],\n",
       "        [98],\n",
       "        [47],\n",
       "        [37],\n",
       "        [88],\n",
       "        [14],\n",
       "        [34],\n",
       "        [80],\n",
       "        [49],\n",
       "        [25],\n",
       "        [17],\n",
       "        [47],\n",
       "        [53],\n",
       "        [47],\n",
       "        [74],\n",
       "        [99],\n",
       "        [67],\n",
       "        [ 4],\n",
       "        [49],\n",
       "        [14],\n",
       "        [70],\n",
       "        [37],\n",
       "        [11],\n",
       "        [43],\n",
       "        [78]],\n",
       "\n",
       "       [[40],\n",
       "        [80],\n",
       "        [76],\n",
       "        [14],\n",
       "        [95],\n",
       "        [ 3],\n",
       "        [80],\n",
       "        [24],\n",
       "        [85],\n",
       "        [60],\n",
       "        [27],\n",
       "        [54],\n",
       "        [12],\n",
       "        [ 6],\n",
       "        [95],\n",
       "        [22],\n",
       "        [41],\n",
       "        [51],\n",
       "        [40],\n",
       "        [63],\n",
       "        [16],\n",
       "        [34],\n",
       "        [21],\n",
       "        [75],\n",
       "        [17],\n",
       "        [34],\n",
       "        [31],\n",
       "        [16],\n",
       "        [39],\n",
       "        [15],\n",
       "        [96],\n",
       "        [71],\n",
       "        [47],\n",
       "        [55],\n",
       "        [57],\n",
       "        [52],\n",
       "        [ 9],\n",
       "        [20],\n",
       "        [16],\n",
       "        [15],\n",
       "        [61],\n",
       "        [44],\n",
       "        [36],\n",
       "        [68],\n",
       "        [70],\n",
       "        [31],\n",
       "        [58],\n",
       "        [59],\n",
       "        [16],\n",
       "        [97]],\n",
       "\n",
       "       [[50],\n",
       "        [96],\n",
       "        [34],\n",
       "        [84],\n",
       "        [74],\n",
       "        [22],\n",
       "        [51],\n",
       "        [25],\n",
       "        [22],\n",
       "        [68],\n",
       "        [87],\n",
       "        [20],\n",
       "        [10],\n",
       "        [24],\n",
       "        [12],\n",
       "        [75],\n",
       "        [12],\n",
       "        [88],\n",
       "        [14],\n",
       "        [22],\n",
       "        [89],\n",
       "        [41],\n",
       "        [87],\n",
       "        [64],\n",
       "        [14],\n",
       "        [90],\n",
       "        [39],\n",
       "        [58],\n",
       "        [40],\n",
       "        [ 6],\n",
       "        [40],\n",
       "        [83],\n",
       "        [32],\n",
       "        [74],\n",
       "        [89],\n",
       "        [31],\n",
       "        [14],\n",
       "        [51],\n",
       "        [56],\n",
       "        [45],\n",
       "        [84],\n",
       "        [50],\n",
       "        [12],\n",
       "        [70],\n",
       "        [39],\n",
       "        [42],\n",
       "        [21],\n",
       "        [84],\n",
       "        [52],\n",
       "        [ 0]],\n",
       "\n",
       "       [[71],\n",
       "        [98],\n",
       "        [80],\n",
       "        [48],\n",
       "        [25],\n",
       "        [33],\n",
       "        [34],\n",
       "        [ 6],\n",
       "        [88],\n",
       "        [59],\n",
       "        [35],\n",
       "        [91],\n",
       "        [54],\n",
       "        [90],\n",
       "        [80],\n",
       "        [98],\n",
       "        [89],\n",
       "        [44],\n",
       "        [ 0],\n",
       "        [69],\n",
       "        [55],\n",
       "        [75],\n",
       "        [27],\n",
       "        [82],\n",
       "        [40],\n",
       "        [66],\n",
       "        [86],\n",
       "        [68],\n",
       "        [90],\n",
       "        [ 9],\n",
       "        [62],\n",
       "        [94],\n",
       "        [84],\n",
       "        [64],\n",
       "        [35],\n",
       "        [ 3],\n",
       "        [18],\n",
       "        [88],\n",
       "        [ 6],\n",
       "        [ 0],\n",
       "        [ 4],\n",
       "        [50],\n",
       "        [73],\n",
       "        [10],\n",
       "        [94],\n",
       "        [71],\n",
       "        [ 5],\n",
       "        [ 6],\n",
       "        [67],\n",
       "        [17]],\n",
       "\n",
       "       [[79],\n",
       "        [91],\n",
       "        [ 5],\n",
       "        [64],\n",
       "        [95],\n",
       "        [66],\n",
       "        [58],\n",
       "        [73],\n",
       "        [32],\n",
       "        [ 6],\n",
       "        [63],\n",
       "        [ 3],\n",
       "        [93],\n",
       "        [12],\n",
       "        [95],\n",
       "        [42],\n",
       "        [37],\n",
       "        [65],\n",
       "        [87],\n",
       "        [56],\n",
       "        [21],\n",
       "        [22],\n",
       "        [98],\n",
       "        [72],\n",
       "        [22],\n",
       "        [39],\n",
       "        [23],\n",
       "        [94],\n",
       "        [ 4],\n",
       "        [96],\n",
       "        [87],\n",
       "        [84],\n",
       "        [58],\n",
       "        [91],\n",
       "        [82],\n",
       "        [80],\n",
       "        [41],\n",
       "        [61],\n",
       "        [24],\n",
       "        [ 4],\n",
       "        [75],\n",
       "        [64],\n",
       "        [87],\n",
       "        [35],\n",
       "        [66],\n",
       "        [53],\n",
       "        [90],\n",
       "        [62],\n",
       "        [71],\n",
       "        [37]],\n",
       "\n",
       "       [[10],\n",
       "        [56],\n",
       "        [88],\n",
       "        [ 5],\n",
       "        [79],\n",
       "        [98],\n",
       "        [69],\n",
       "        [58],\n",
       "        [69],\n",
       "        [66],\n",
       "        [68],\n",
       "        [11],\n",
       "        [ 3],\n",
       "        [28],\n",
       "        [28],\n",
       "        [32],\n",
       "        [52],\n",
       "        [75],\n",
       "        [93],\n",
       "        [28],\n",
       "        [91],\n",
       "        [42],\n",
       "        [20],\n",
       "        [49],\n",
       "        [59],\n",
       "        [14],\n",
       "        [10],\n",
       "        [85],\n",
       "        [94],\n",
       "        [41],\n",
       "        [22],\n",
       "        [35],\n",
       "        [79],\n",
       "        [49],\n",
       "        [45],\n",
       "        [71],\n",
       "        [48],\n",
       "        [97],\n",
       "        [19],\n",
       "        [59],\n",
       "        [ 6],\n",
       "        [61],\n",
       "        [88],\n",
       "        [20],\n",
       "        [62],\n",
       "        [31],\n",
       "        [41],\n",
       "        [89],\n",
       "        [75],\n",
       "        [ 9]]])"
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = np.array(a[:,:,[1]])\n",
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "id": "3bfda8a1",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[42],\n",
       "        [79],\n",
       "        [52],\n",
       "        [91],\n",
       "        [73],\n",
       "        [45],\n",
       "        [46],\n",
       "        [89],\n",
       "        [32],\n",
       "        [94],\n",
       "        [14],\n",
       "        [41],\n",
       "        [17],\n",
       "        [15],\n",
       "        [60],\n",
       "        [62],\n",
       "        [89],\n",
       "        [17],\n",
       "        [87],\n",
       "        [54],\n",
       "        [48],\n",
       "        [59],\n",
       "        [65],\n",
       "        [22],\n",
       "        [46],\n",
       "        [52],\n",
       "        [77],\n",
       "        [98],\n",
       "        [37],\n",
       "        [12],\n",
       "        [65],\n",
       "        [41],\n",
       "        [35],\n",
       "        [35],\n",
       "        [24],\n",
       "        [ 8],\n",
       "        [31],\n",
       "        [47],\n",
       "        [28],\n",
       "        [38],\n",
       "        [59],\n",
       "        [96],\n",
       "        [83],\n",
       "        [56],\n",
       "        [43],\n",
       "        [ 3],\n",
       "        [10],\n",
       "        [ 1],\n",
       "        [97],\n",
       "        [64]],\n",
       "\n",
       "       [[36],\n",
       "        [ 5],\n",
       "        [41],\n",
       "        [96],\n",
       "        [86],\n",
       "        [ 0],\n",
       "        [ 7],\n",
       "        [96],\n",
       "        [51],\n",
       "        [30],\n",
       "        [16],\n",
       "        [ 3],\n",
       "        [45],\n",
       "        [99],\n",
       "        [33],\n",
       "        [26],\n",
       "        [87],\n",
       "        [68],\n",
       "        [57],\n",
       "        [87],\n",
       "        [ 7],\n",
       "        [84],\n",
       "        [79],\n",
       "        [34],\n",
       "        [97],\n",
       "        [40],\n",
       "        [73],\n",
       "        [27],\n",
       "        [29],\n",
       "        [77],\n",
       "        [84],\n",
       "        [96],\n",
       "        [35],\n",
       "        [53],\n",
       "        [53],\n",
       "        [96],\n",
       "        [27],\n",
       "        [88],\n",
       "        [24],\n",
       "        [67],\n",
       "        [51],\n",
       "        [17],\n",
       "        [78],\n",
       "        [ 5],\n",
       "        [40],\n",
       "        [17],\n",
       "        [60],\n",
       "        [63],\n",
       "        [93],\n",
       "        [97]],\n",
       "\n",
       "       [[31],\n",
       "        [98],\n",
       "        [54],\n",
       "        [57],\n",
       "        [36],\n",
       "        [89],\n",
       "        [17],\n",
       "        [33],\n",
       "        [53],\n",
       "        [ 8],\n",
       "        [77],\n",
       "        [ 6],\n",
       "        [30],\n",
       "        [20],\n",
       "        [44],\n",
       "        [29],\n",
       "        [79],\n",
       "        [29],\n",
       "        [57],\n",
       "        [16],\n",
       "        [40],\n",
       "        [54],\n",
       "        [36],\n",
       "        [52],\n",
       "        [52],\n",
       "        [95],\n",
       "        [81],\n",
       "        [ 7],\n",
       "        [ 5],\n",
       "        [97],\n",
       "        [59],\n",
       "        [63],\n",
       "        [92],\n",
       "        [34],\n",
       "        [42],\n",
       "        [12],\n",
       "        [57],\n",
       "        [ 4],\n",
       "        [91],\n",
       "        [22],\n",
       "        [53],\n",
       "        [60],\n",
       "        [85],\n",
       "        [12],\n",
       "        [11],\n",
       "        [22],\n",
       "        [73],\n",
       "        [77],\n",
       "        [14],\n",
       "        [ 6]],\n",
       "\n",
       "       [[33],\n",
       "        [ 2],\n",
       "        [67],\n",
       "        [74],\n",
       "        [61],\n",
       "        [24],\n",
       "        [ 9],\n",
       "        [63],\n",
       "        [98],\n",
       "        [35],\n",
       "        [65],\n",
       "        [ 3],\n",
       "        [53],\n",
       "        [46],\n",
       "        [58],\n",
       "        [58],\n",
       "        [96],\n",
       "        [65],\n",
       "        [73],\n",
       "        [24],\n",
       "        [37],\n",
       "        [31],\n",
       "        [56],\n",
       "        [32],\n",
       "        [67],\n",
       "        [11],\n",
       "        [79],\n",
       "        [93],\n",
       "        [ 5],\n",
       "        [23],\n",
       "        [46],\n",
       "        [27],\n",
       "        [15],\n",
       "        [44],\n",
       "        [78],\n",
       "        [84],\n",
       "        [32],\n",
       "        [ 5],\n",
       "        [86],\n",
       "        [61],\n",
       "        [48],\n",
       "        [12],\n",
       "        [33],\n",
       "        [ 0],\n",
       "        [94],\n",
       "        [62],\n",
       "        [59],\n",
       "        [87],\n",
       "        [84],\n",
       "        [63]],\n",
       "\n",
       "       [[79],\n",
       "        [29],\n",
       "        [21],\n",
       "        [43],\n",
       "        [35],\n",
       "        [18],\n",
       "        [71],\n",
       "        [88],\n",
       "        [55],\n",
       "        [ 4],\n",
       "        [30],\n",
       "        [15],\n",
       "        [19],\n",
       "        [82],\n",
       "        [81],\n",
       "        [14],\n",
       "        [83],\n",
       "        [88],\n",
       "        [88],\n",
       "        [ 0],\n",
       "        [80],\n",
       "        [54],\n",
       "        [97],\n",
       "        [36],\n",
       "        [57],\n",
       "        [ 8],\n",
       "        [21],\n",
       "        [32],\n",
       "        [67],\n",
       "        [97],\n",
       "        [13],\n",
       "        [17],\n",
       "        [35],\n",
       "        [28],\n",
       "        [80],\n",
       "        [86],\n",
       "        [10],\n",
       "        [58],\n",
       "        [69],\n",
       "        [61],\n",
       "        [ 3],\n",
       "        [15],\n",
       "        [53],\n",
       "        [81],\n",
       "        [51],\n",
       "        [29],\n",
       "        [46],\n",
       "        [63],\n",
       "        [24],\n",
       "        [69]],\n",
       "\n",
       "       [[86],\n",
       "        [ 7],\n",
       "        [92],\n",
       "        [22],\n",
       "        [11],\n",
       "        [31],\n",
       "        [50],\n",
       "        [24],\n",
       "        [65],\n",
       "        [23],\n",
       "        [95],\n",
       "        [43],\n",
       "        [49],\n",
       "        [23],\n",
       "        [30],\n",
       "        [ 8],\n",
       "        [91],\n",
       "        [14],\n",
       "        [77],\n",
       "        [71],\n",
       "        [69],\n",
       "        [ 5],\n",
       "        [94],\n",
       "        [82],\n",
       "        [10],\n",
       "        [80],\n",
       "        [40],\n",
       "        [88],\n",
       "        [79],\n",
       "        [52],\n",
       "        [80],\n",
       "        [59],\n",
       "        [84],\n",
       "        [27],\n",
       "        [20],\n",
       "        [18],\n",
       "        [52],\n",
       "        [69],\n",
       "        [96],\n",
       "        [73],\n",
       "        [52],\n",
       "        [45],\n",
       "        [54],\n",
       "        [53],\n",
       "        [45],\n",
       "        [59],\n",
       "        [25],\n",
       "        [38],\n",
       "        [73],\n",
       "        [45]]])"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d = np.array(a[:,:,[2]])\n",
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "id": "e2f28ece",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[125],\n",
       "        [190],\n",
       "        [169],\n",
       "        [196],\n",
       "        [172],\n",
       "        [128],\n",
       "        [154],\n",
       "        [179],\n",
       "        [185],\n",
       "        [165],\n",
       "        [170],\n",
       "        [114],\n",
       "        [121],\n",
       "        [ 49],\n",
       "        [175],\n",
       "        [121],\n",
       "        [210],\n",
       "        [114],\n",
       "        [253],\n",
       "        [204],\n",
       "        [162],\n",
       "        [210],\n",
       "        [129],\n",
       "        [160],\n",
       "        [149],\n",
       "        [219],\n",
       "        [257],\n",
       "        [145],\n",
       "        [115],\n",
       "        [111],\n",
       "        [ 97],\n",
       "        [ 81],\n",
       "        [187],\n",
       "        [107],\n",
       "        [ 91],\n",
       "        [ 46],\n",
       "        [121],\n",
       "        [126],\n",
       "        [134],\n",
       "        [137],\n",
       "        [161],\n",
       "        [167],\n",
       "        [145],\n",
       "        [197],\n",
       "        [ 83],\n",
       "        [ 87],\n",
       "        [112],\n",
       "        [ 74],\n",
       "        [214],\n",
       "        [161]],\n",
       "\n",
       "       [[144],\n",
       "        [160],\n",
       "        [182],\n",
       "        [199],\n",
       "        [200],\n",
       "        [ 56],\n",
       "        [108],\n",
       "        [204],\n",
       "        [231],\n",
       "        [103],\n",
       "        [136],\n",
       "        [ 86],\n",
       "        [ 83],\n",
       "        [123],\n",
       "        [212],\n",
       "        [ 80],\n",
       "        [128],\n",
       "        [183],\n",
       "        [148],\n",
       "        [191],\n",
       "        [120],\n",
       "        [120],\n",
       "        [141],\n",
       "        [176],\n",
       "        [128],\n",
       "        [100],\n",
       "        [137],\n",
       "        [112],\n",
       "        [108],\n",
       "        [113],\n",
       "        [222],\n",
       "        [182],\n",
       "        [143],\n",
       "        [146],\n",
       "        [164],\n",
       "        [164],\n",
       "        [127],\n",
       "        [192],\n",
       "        [115],\n",
       "        [164],\n",
       "        [190],\n",
       "        [ 96],\n",
       "        [189],\n",
       "        [131],\n",
       "        [111],\n",
       "        [143],\n",
       "        [124],\n",
       "        [147],\n",
       "        [116],\n",
       "        [216]],\n",
       "\n",
       "       [[ 82],\n",
       "        [199],\n",
       "        [ 89],\n",
       "        [222],\n",
       "        [147],\n",
       "        [196],\n",
       "        [ 80],\n",
       "        [ 58],\n",
       "        [ 91],\n",
       "        [ 78],\n",
       "        [225],\n",
       "        [109],\n",
       "        [ 62],\n",
       "        [109],\n",
       "        [110],\n",
       "        [134],\n",
       "        [164],\n",
       "        [153],\n",
       "        [170],\n",
       "        [107],\n",
       "        [206],\n",
       "        [159],\n",
       "        [172],\n",
       "        [215],\n",
       "        [149],\n",
       "        [196],\n",
       "        [133],\n",
       "        [159],\n",
       "        [ 79],\n",
       "        [192],\n",
       "        [103],\n",
       "        [221],\n",
       "        [215],\n",
       "        [172],\n",
       "        [201],\n",
       "        [ 84],\n",
       "        [127],\n",
       "        [151],\n",
       "        [222],\n",
       "        [115],\n",
       "        [192],\n",
       "        [190],\n",
       "        [107],\n",
       "        [ 82],\n",
       "        [121],\n",
       "        [ 99],\n",
       "        [156],\n",
       "        [185],\n",
       "        [145],\n",
       "        [ 49]],\n",
       "\n",
       "       [[121],\n",
       "        [145],\n",
       "        [148],\n",
       "        [190],\n",
       "        [119],\n",
       "        [ 57],\n",
       "        [ 96],\n",
       "        [167],\n",
       "        [255],\n",
       "        [184],\n",
       "        [153],\n",
       "        [112],\n",
       "        [120],\n",
       "        [186],\n",
       "        [214],\n",
       "        [243],\n",
       "        [201],\n",
       "        [115],\n",
       "        [129],\n",
       "        [180],\n",
       "        [114],\n",
       "        [127],\n",
       "        [102],\n",
       "        [152],\n",
       "        [197],\n",
       "        [131],\n",
       "        [193],\n",
       "        [201],\n",
       "        [139],\n",
       "        [ 85],\n",
       "        [193],\n",
       "        [169],\n",
       "        [103],\n",
       "        [110],\n",
       "        [190],\n",
       "        [172],\n",
       "        [ 62],\n",
       "        [141],\n",
       "        [191],\n",
       "        [ 99],\n",
       "        [ 78],\n",
       "        [112],\n",
       "        [172],\n",
       "        [ 65],\n",
       "        [275],\n",
       "        [221],\n",
       "        [ 93],\n",
       "        [ 97],\n",
       "        [151],\n",
       "        [153]],\n",
       "\n",
       "       [[215],\n",
       "        [149],\n",
       "        [ 48],\n",
       "        [140],\n",
       "        [168],\n",
       "        [167],\n",
       "        [144],\n",
       "        [184],\n",
       "        [165],\n",
       "        [ 39],\n",
       "        [111],\n",
       "        [ 37],\n",
       "        [180],\n",
       "        [128],\n",
       "        [178],\n",
       "        [107],\n",
       "        [128],\n",
       "        [194],\n",
       "        [264],\n",
       "        [143],\n",
       "        [121],\n",
       "        [162],\n",
       "        [244],\n",
       "        [194],\n",
       "        [133],\n",
       "        [ 95],\n",
       "        [ 49],\n",
       "        [216],\n",
       "        [ 97],\n",
       "        [232],\n",
       "        [165],\n",
       "        [189],\n",
       "        [120],\n",
       "        [149],\n",
       "        [194],\n",
       "        [216],\n",
       "        [ 80],\n",
       "        [211],\n",
       "        [172],\n",
       "        [ 99],\n",
       "        [102],\n",
       "        [101],\n",
       "        [157],\n",
       "        [143],\n",
       "        [129],\n",
       "        [135],\n",
       "        [222],\n",
       "        [197],\n",
       "        [193],\n",
       "        [146]],\n",
       "\n",
       "       [[194],\n",
       "        [104],\n",
       "        [238],\n",
       "        [ 47],\n",
       "        [104],\n",
       "        [210],\n",
       "        [154],\n",
       "        [161],\n",
       "        [208],\n",
       "        [105],\n",
       "        [182],\n",
       "        [106],\n",
       "        [118],\n",
       "        [ 57],\n",
       "        [ 76],\n",
       "        [116],\n",
       "        [202],\n",
       "        [125],\n",
       "        [257],\n",
       "        [195],\n",
       "        [235],\n",
       "        [133],\n",
       "        [140],\n",
       "        [158],\n",
       "        [125],\n",
       "        [138],\n",
       "        [133],\n",
       "        [222],\n",
       "        [247],\n",
       "        [106],\n",
       "        [177],\n",
       "        [133],\n",
       "        [218],\n",
       "        [ 91],\n",
       "        [ 92],\n",
       "        [130],\n",
       "        [178],\n",
       "        [209],\n",
       "        [147],\n",
       "        [146],\n",
       "        [ 78],\n",
       "        [176],\n",
       "        [213],\n",
       "        [153],\n",
       "        [204],\n",
       "        [173],\n",
       "        [138],\n",
       "        [159],\n",
       "        [204],\n",
       "        [ 77]]])"
      ]
     },
     "execution_count": 164,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score = b + c + d\n",
    "score"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3020a9c2",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 生成性别数组sex，水平叠加数组sex和score得到data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "id": "a3a49785",
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0]],\n",
       "\n",
       "       [[0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1]],\n",
       "\n",
       "       [[0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1]],\n",
       "\n",
       "       [[0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1]],\n",
       "\n",
       "       [[0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1]],\n",
       "\n",
       "       [[1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1],\n",
       "        [0],\n",
       "        [1],\n",
       "        [1]]])"
      ]
     },
     "execution_count": 169,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sex = np.random.randint(0,2,size=(6,50,1))\n",
    "sex # 男0，女1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "id": "79e75489",
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[[125,   0],\n",
       "        [190,   1],\n",
       "        [169,   1],\n",
       "        [196,   1],\n",
       "        [172,   0],\n",
       "        [128,   0],\n",
       "        [154,   1],\n",
       "        [179,   1],\n",
       "        [185,   0],\n",
       "        [165,   1],\n",
       "        [170,   1],\n",
       "        [114,   1],\n",
       "        [121,   0],\n",
       "        [ 49,   0],\n",
       "        [175,   0],\n",
       "        [121,   0],\n",
       "        [210,   1],\n",
       "        [114,   1],\n",
       "        [253,   0],\n",
       "        [204,   0],\n",
       "        [162,   1],\n",
       "        [210,   1],\n",
       "        [129,   0],\n",
       "        [160,   1],\n",
       "        [149,   0],\n",
       "        [219,   1],\n",
       "        [257,   1],\n",
       "        [145,   1],\n",
       "        [115,   0],\n",
       "        [111,   0],\n",
       "        [ 97,   0],\n",
       "        [ 81,   0],\n",
       "        [187,   0],\n",
       "        [107,   0],\n",
       "        [ 91,   1],\n",
       "        [ 46,   1],\n",
       "        [121,   1],\n",
       "        [126,   0],\n",
       "        [134,   1],\n",
       "        [137,   0],\n",
       "        [161,   1],\n",
       "        [167,   1],\n",
       "        [145,   0],\n",
       "        [197,   1],\n",
       "        [ 83,   0],\n",
       "        [ 87,   1],\n",
       "        [112,   0],\n",
       "        [ 74,   1],\n",
       "        [214,   1],\n",
       "        [161,   0]],\n",
       "\n",
       "       [[144,   0],\n",
       "        [160,   0],\n",
       "        [182,   0],\n",
       "        [199,   0],\n",
       "        [200,   1],\n",
       "        [ 56,   0],\n",
       "        [108,   1],\n",
       "        [204,   1],\n",
       "        [231,   0],\n",
       "        [103,   0],\n",
       "        [136,   0],\n",
       "        [ 86,   1],\n",
       "        [ 83,   0],\n",
       "        [123,   0],\n",
       "        [212,   0],\n",
       "        [ 80,   0],\n",
       "        [128,   0],\n",
       "        [183,   1],\n",
       "        [148,   1],\n",
       "        [191,   0],\n",
       "        [120,   1],\n",
       "        [120,   1],\n",
       "        [141,   1],\n",
       "        [176,   1],\n",
       "        [128,   1],\n",
       "        [100,   0],\n",
       "        [137,   1],\n",
       "        [112,   1],\n",
       "        [108,   0],\n",
       "        [113,   1],\n",
       "        [222,   0],\n",
       "        [182,   0],\n",
       "        [143,   1],\n",
       "        [146,   0],\n",
       "        [164,   1],\n",
       "        [164,   0],\n",
       "        [127,   1],\n",
       "        [192,   0],\n",
       "        [115,   0],\n",
       "        [164,   1],\n",
       "        [190,   1],\n",
       "        [ 96,   0],\n",
       "        [189,   1],\n",
       "        [131,   1],\n",
       "        [111,   0],\n",
       "        [143,   1],\n",
       "        [124,   0],\n",
       "        [147,   1],\n",
       "        [116,   1],\n",
       "        [216,   1]],\n",
       "\n",
       "       [[ 82,   0],\n",
       "        [199,   0],\n",
       "        [ 89,   1],\n",
       "        [222,   1],\n",
       "        [147,   1],\n",
       "        [196,   0],\n",
       "        [ 80,   1],\n",
       "        [ 58,   1],\n",
       "        [ 91,   1],\n",
       "        [ 78,   0],\n",
       "        [225,   1],\n",
       "        [109,   1],\n",
       "        [ 62,   1],\n",
       "        [109,   0],\n",
       "        [110,   0],\n",
       "        [134,   0],\n",
       "        [164,   1],\n",
       "        [153,   1],\n",
       "        [170,   0],\n",
       "        [107,   1],\n",
       "        [206,   0],\n",
       "        [159,   1],\n",
       "        [172,   1],\n",
       "        [215,   1],\n",
       "        [149,   1],\n",
       "        [196,   0],\n",
       "        [133,   0],\n",
       "        [159,   0],\n",
       "        [ 79,   0],\n",
       "        [192,   0],\n",
       "        [103,   0],\n",
       "        [221,   1],\n",
       "        [215,   1],\n",
       "        [172,   0],\n",
       "        [201,   1],\n",
       "        [ 84,   0],\n",
       "        [127,   1],\n",
       "        [151,   0],\n",
       "        [222,   0],\n",
       "        [115,   1],\n",
       "        [192,   1],\n",
       "        [190,   1],\n",
       "        [107,   1],\n",
       "        [ 82,   0],\n",
       "        [121,   0],\n",
       "        [ 99,   1],\n",
       "        [156,   1],\n",
       "        [185,   0],\n",
       "        [145,   1],\n",
       "        [ 49,   1]],\n",
       "\n",
       "       [[121,   0],\n",
       "        [145,   1],\n",
       "        [148,   0],\n",
       "        [190,   1],\n",
       "        [119,   1],\n",
       "        [ 57,   1],\n",
       "        [ 96,   1],\n",
       "        [167,   1],\n",
       "        [255,   1],\n",
       "        [184,   0],\n",
       "        [153,   1],\n",
       "        [112,   0],\n",
       "        [120,   0],\n",
       "        [186,   0],\n",
       "        [214,   1],\n",
       "        [243,   1],\n",
       "        [201,   0],\n",
       "        [115,   0],\n",
       "        [129,   1],\n",
       "        [180,   0],\n",
       "        [114,   1],\n",
       "        [127,   0],\n",
       "        [102,   1],\n",
       "        [152,   0],\n",
       "        [197,   0],\n",
       "        [131,   1],\n",
       "        [193,   1],\n",
       "        [201,   1],\n",
       "        [139,   0],\n",
       "        [ 85,   0],\n",
       "        [193,   1],\n",
       "        [169,   0],\n",
       "        [103,   0],\n",
       "        [110,   0],\n",
       "        [190,   1],\n",
       "        [172,   1],\n",
       "        [ 62,   0],\n",
       "        [141,   0],\n",
       "        [191,   0],\n",
       "        [ 99,   0],\n",
       "        [ 78,   0],\n",
       "        [112,   0],\n",
       "        [172,   1],\n",
       "        [ 65,   1],\n",
       "        [275,   1],\n",
       "        [221,   1],\n",
       "        [ 93,   0],\n",
       "        [ 97,   1],\n",
       "        [151,   1],\n",
       "        [153,   1]],\n",
       "\n",
       "       [[215,   0],\n",
       "        [149,   0],\n",
       "        [ 48,   0],\n",
       "        [140,   1],\n",
       "        [168,   0],\n",
       "        [167,   0],\n",
       "        [144,   1],\n",
       "        [184,   0],\n",
       "        [165,   1],\n",
       "        [ 39,   0],\n",
       "        [111,   0],\n",
       "        [ 37,   1],\n",
       "        [180,   1],\n",
       "        [128,   0],\n",
       "        [178,   1],\n",
       "        [107,   1],\n",
       "        [128,   1],\n",
       "        [194,   0],\n",
       "        [264,   1],\n",
       "        [143,   1],\n",
       "        [121,   1],\n",
       "        [162,   0],\n",
       "        [244,   1],\n",
       "        [194,   0],\n",
       "        [133,   1],\n",
       "        [ 95,   0],\n",
       "        [ 49,   0],\n",
       "        [216,   1],\n",
       "        [ 97,   0],\n",
       "        [232,   1],\n",
       "        [165,   1],\n",
       "        [189,   1],\n",
       "        [120,   0],\n",
       "        [149,   0],\n",
       "        [194,   1],\n",
       "        [216,   0],\n",
       "        [ 80,   0],\n",
       "        [211,   1],\n",
       "        [172,   0],\n",
       "        [ 99,   1],\n",
       "        [102,   1],\n",
       "        [101,   1],\n",
       "        [157,   1],\n",
       "        [143,   0],\n",
       "        [129,   0],\n",
       "        [135,   1],\n",
       "        [222,   0],\n",
       "        [197,   0],\n",
       "        [193,   1],\n",
       "        [146,   1]],\n",
       "\n",
       "       [[194,   1],\n",
       "        [104,   0],\n",
       "        [238,   1],\n",
       "        [ 47,   1],\n",
       "        [104,   0],\n",
       "        [210,   0],\n",
       "        [154,   0],\n",
       "        [161,   0],\n",
       "        [208,   1],\n",
       "        [105,   0],\n",
       "        [182,   1],\n",
       "        [106,   0],\n",
       "        [118,   1],\n",
       "        [ 57,   0],\n",
       "        [ 76,   0],\n",
       "        [116,   1],\n",
       "        [202,   0],\n",
       "        [125,   0],\n",
       "        [257,   1],\n",
       "        [195,   0],\n",
       "        [235,   1],\n",
       "        [133,   1],\n",
       "        [140,   0],\n",
       "        [158,   0],\n",
       "        [125,   1],\n",
       "        [138,   0],\n",
       "        [133,   1],\n",
       "        [222,   1],\n",
       "        [247,   1],\n",
       "        [106,   1],\n",
       "        [177,   0],\n",
       "        [133,   0],\n",
       "        [218,   0],\n",
       "        [ 91,   1],\n",
       "        [ 92,   0],\n",
       "        [130,   1],\n",
       "        [178,   0],\n",
       "        [209,   0],\n",
       "        [147,   1],\n",
       "        [146,   1],\n",
       "        [ 78,   1],\n",
       "        [176,   0],\n",
       "        [213,   0],\n",
       "        [153,   0],\n",
       "        [204,   0],\n",
       "        [173,   1],\n",
       "        [138,   1],\n",
       "        [159,   0],\n",
       "        [204,   1],\n",
       "        [ 77,   1]]])"
      ]
     },
     "execution_count": 177,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = np.concatenate([score,sex],axis=2)\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0260949d",
   "metadata": {},
   "source": [
    "### 分别计算男女生各科成绩统计指标：最小值、最大值、平均分、中位数、标准差"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "76780e55",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "#### 女生"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 258,
   "id": "154388f0",
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0,  1,  0],\n",
       "       [ 0,  2,  0],\n",
       "       [ 0,  3,  0],\n",
       "       [ 0,  6,  0],\n",
       "       [ 0,  7,  0],\n",
       "       [ 0,  9,  0],\n",
       "       [ 0, 10,  0],\n",
       "       [ 0, 11,  0],\n",
       "       [ 0, 16,  0],\n",
       "       [ 0, 17,  0],\n",
       "       [ 0, 20,  0],\n",
       "       [ 0, 21,  0],\n",
       "       [ 0, 23,  0],\n",
       "       [ 0, 25,  0],\n",
       "       [ 0, 26,  0],\n",
       "       [ 0, 27,  0],\n",
       "       [ 0, 34,  0],\n",
       "       [ 0, 35,  0],\n",
       "       [ 0, 36,  0],\n",
       "       [ 0, 38,  0],\n",
       "       [ 0, 40,  0],\n",
       "       [ 0, 41,  0],\n",
       "       [ 0, 43,  0],\n",
       "       [ 0, 45,  0],\n",
       "       [ 0, 47,  0],\n",
       "       [ 0, 48,  0],\n",
       "       [ 1,  4,  0],\n",
       "       [ 1,  6,  0],\n",
       "       [ 1,  7,  0],\n",
       "       [ 1, 11,  0],\n",
       "       [ 1, 17,  0],\n",
       "       [ 1, 18,  0],\n",
       "       [ 1, 20,  0],\n",
       "       [ 1, 21,  0],\n",
       "       [ 1, 22,  0],\n",
       "       [ 1, 23,  0],\n",
       "       [ 1, 24,  0],\n",
       "       [ 1, 26,  0],\n",
       "       [ 1, 27,  0],\n",
       "       [ 1, 29,  0],\n",
       "       [ 1, 32,  0],\n",
       "       [ 1, 34,  0],\n",
       "       [ 1, 36,  0],\n",
       "       [ 1, 39,  0],\n",
       "       [ 1, 40,  0],\n",
       "       [ 1, 42,  0],\n",
       "       [ 1, 43,  0],\n",
       "       [ 1, 45,  0],\n",
       "       [ 1, 47,  0],\n",
       "       [ 1, 48,  0],\n",
       "       [ 1, 49,  0],\n",
       "       [ 2,  2,  0],\n",
       "       [ 2,  3,  0],\n",
       "       [ 2,  4,  0],\n",
       "       [ 2,  6,  0],\n",
       "       [ 2,  7,  0],\n",
       "       [ 2,  8,  0],\n",
       "       [ 2, 10,  0],\n",
       "       [ 2, 11,  0],\n",
       "       [ 2, 12,  0],\n",
       "       [ 2, 16,  0],\n",
       "       [ 2, 17,  0],\n",
       "       [ 2, 19,  0],\n",
       "       [ 2, 21,  0],\n",
       "       [ 2, 22,  0],\n",
       "       [ 2, 23,  0],\n",
       "       [ 2, 24,  0],\n",
       "       [ 2, 31,  0],\n",
       "       [ 2, 32,  0],\n",
       "       [ 2, 34,  0],\n",
       "       [ 2, 36,  0],\n",
       "       [ 2, 39,  0],\n",
       "       [ 2, 40,  0],\n",
       "       [ 2, 41,  0],\n",
       "       [ 2, 42,  0],\n",
       "       [ 2, 45,  0],\n",
       "       [ 2, 46,  0],\n",
       "       [ 2, 48,  0],\n",
       "       [ 2, 49,  0],\n",
       "       [ 3,  1,  0],\n",
       "       [ 3,  3,  0],\n",
       "       [ 3,  4,  0],\n",
       "       [ 3,  5,  0],\n",
       "       [ 3,  6,  0],\n",
       "       [ 3,  7,  0],\n",
       "       [ 3,  8,  0],\n",
       "       [ 3, 10,  0],\n",
       "       [ 3, 14,  0],\n",
       "       [ 3, 15,  0],\n",
       "       [ 3, 18,  0],\n",
       "       [ 3, 20,  0],\n",
       "       [ 3, 22,  0],\n",
       "       [ 3, 25,  0],\n",
       "       [ 3, 26,  0],\n",
       "       [ 3, 27,  0],\n",
       "       [ 3, 30,  0],\n",
       "       [ 3, 34,  0],\n",
       "       [ 3, 35,  0],\n",
       "       [ 3, 42,  0],\n",
       "       [ 3, 43,  0],\n",
       "       [ 3, 44,  0],\n",
       "       [ 3, 45,  0],\n",
       "       [ 3, 47,  0],\n",
       "       [ 3, 48,  0],\n",
       "       [ 3, 49,  0],\n",
       "       [ 4,  3,  0],\n",
       "       [ 4,  6,  0],\n",
       "       [ 4,  8,  0],\n",
       "       [ 4, 11,  0],\n",
       "       [ 4, 12,  0],\n",
       "       [ 4, 14,  0],\n",
       "       [ 4, 15,  0],\n",
       "       [ 4, 16,  0],\n",
       "       [ 4, 18,  0],\n",
       "       [ 4, 19,  0],\n",
       "       [ 4, 20,  0],\n",
       "       [ 4, 22,  0],\n",
       "       [ 4, 24,  0],\n",
       "       [ 4, 27,  0],\n",
       "       [ 4, 29,  0],\n",
       "       [ 4, 30,  0],\n",
       "       [ 4, 31,  0],\n",
       "       [ 4, 34,  0],\n",
       "       [ 4, 37,  0],\n",
       "       [ 4, 39,  0],\n",
       "       [ 4, 40,  0],\n",
       "       [ 4, 41,  0],\n",
       "       [ 4, 42,  0],\n",
       "       [ 4, 45,  0],\n",
       "       [ 4, 48,  0],\n",
       "       [ 4, 49,  0],\n",
       "       [ 5,  0,  0],\n",
       "       [ 5,  2,  0],\n",
       "       [ 5,  3,  0],\n",
       "       [ 5,  8,  0],\n",
       "       [ 5, 10,  0],\n",
       "       [ 5, 12,  0],\n",
       "       [ 5, 15,  0],\n",
       "       [ 5, 18,  0],\n",
       "       [ 5, 20,  0],\n",
       "       [ 5, 21,  0],\n",
       "       [ 5, 24,  0],\n",
       "       [ 5, 26,  0],\n",
       "       [ 5, 27,  0],\n",
       "       [ 5, 28,  0],\n",
       "       [ 5, 29,  0],\n",
       "       [ 5, 33,  0],\n",
       "       [ 5, 35,  0],\n",
       "       [ 5, 38,  0],\n",
       "       [ 5, 39,  0],\n",
       "       [ 5, 40,  0],\n",
       "       [ 5, 45,  0],\n",
       "       [ 5, 46,  0],\n",
       "       [ 5, 48,  0],\n",
       "       [ 5, 49,  0]])"
      ]
     },
     "execution_count": 258,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = np.array(data[:,:,[1]]) == 1\n",
    "cond # 女生成绩\n",
    "index = np.argwhere(cond)\n",
    "index # 返回满足条件的索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 348,
   "id": "64d0f29f",
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[190, 169, 196, 154, 179, 165, 170, 114, 210, 114, 162, 210, 160, 219, 257, 145, 91, 46, 121, 134, 161, 167, 197, 87, 74, 214, 200, 108, 204, 86, 183, 148, 120, 120, 141, 176, 128, 137, 112, 113, 143, 164, 127, 164, 190, 189, 131, 143, 147, 116, 216, 89, 222, 147, 80, 58, 91, 225, 109, 62, 164, 153, 107, 159, 172, 215, 149, 221, 215, 201, 127, 115, 192, 190, 107, 99, 156, 145, 49, 145, 190, 119, 57, 96, 167, 255, 153, 214, 243, 129, 114, 102, 131, 193, 201, 193, 190, 172, 172, 65, 275, 221, 97, 151, 153, 140, 144, 165, 37, 180, 178, 107, 128, 264, 143, 121, 244, 133, 216, 232, 165, 189, 194, 211, 99, 102, 101, 157, 135, 193, 146, 194, 238, 47, 208, 182, 118, 116, 257, 235, 133, 125, 133, 222, 247, 106, 91, 130, 147, 146, 78, 173, 138, 204, 77]\n"
     ]
    }
   ],
   "source": [
    "ijk = []\n",
    "for i,j,k in index:\n",
    "    ijk.append(data[i,j,k])\n",
    "print(ijk)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 349,
   "id": "2ca7c4ee",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([190, 169, 196, 154, 179, 165, 170, 114, 210, 114, 162, 210, 160,\n",
       "       219, 257, 145,  91,  46, 121, 134, 161, 167, 197,  87,  74, 214,\n",
       "       200, 108, 204,  86, 183, 148, 120, 120, 141, 176, 128, 137, 112,\n",
       "       113, 143, 164, 127, 164, 190, 189, 131, 143, 147, 116, 216,  89,\n",
       "       222, 147,  80,  58,  91, 225, 109,  62, 164, 153, 107, 159, 172,\n",
       "       215, 149, 221, 215, 201, 127, 115, 192, 190, 107,  99, 156, 145,\n",
       "        49, 145, 190, 119,  57,  96, 167, 255, 153, 214, 243, 129, 114,\n",
       "       102, 131, 193, 201, 193, 190, 172, 172,  65, 275, 221,  97, 151,\n",
       "       153, 140, 144, 165,  37, 180, 178, 107, 128, 264, 143, 121, 244,\n",
       "       133, 216, 232, 165, 189, 194, 211,  99, 102, 101, 157, 135, 193,\n",
       "       146, 194, 238,  47, 208, 182, 118, 116, 257, 235, 133, 125, 133,\n",
       "       222, 247, 106,  91, 130, 147, 146,  78, 173, 138, 204,  77])"
      ]
     },
     "execution_count": 349,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arr = np.array(ijk)\n",
    "arr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 362,
   "id": "6ccde42e",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "275"
      ]
     },
     "execution_count": 362,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 女生最大值\n",
    "arr.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 363,
   "id": "85aa48c2",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "37"
      ]
     },
     "execution_count": 363,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 女生最小值\n",
    "arr.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 364,
   "id": "51dbe76a",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "154.18064516129033"
      ]
     },
     "execution_count": 364,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 女生平均值\n",
    "arr.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 365,
   "id": "0cfdf77e",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "151.0"
      ]
     },
     "execution_count": 365,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 女生中位数\n",
    "np.median(arr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 366,
   "id": "e659ecd6",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "50.81877618053186"
      ]
     },
     "execution_count": 366,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 女生标准差\n",
    "arr.std()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "63f32d9f",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "#### 男生"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 371,
   "id": "1ae0033e",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([125, 172, 128, 185, 121,  49, 175, 121, 253, 204, 129, 149, 115,\n",
       "       111,  97,  81, 187, 107, 126, 137, 145,  83, 112, 161, 144, 160,\n",
       "       182, 199,  56, 231, 103, 136,  83, 123, 212,  80, 128, 191, 100,\n",
       "       108, 222, 182, 146, 164, 192, 115,  96, 111, 124,  82, 199, 196,\n",
       "        78, 109, 110, 134, 170, 206, 196, 133, 159,  79, 192, 103, 172,\n",
       "        84, 151, 222,  82, 121, 185, 121, 148, 184, 112, 120, 186, 201,\n",
       "       115, 180, 127, 152, 197, 139,  85, 169, 103, 110,  62, 141, 191,\n",
       "        99,  78, 112,  93, 215, 149,  48, 168, 167, 184,  39, 111, 128,\n",
       "       194, 162, 194,  95,  49,  97, 120, 149, 216,  80, 172, 143, 129,\n",
       "       222, 197, 104, 104, 210, 154, 161, 105, 106,  57,  76, 202, 125,\n",
       "       195, 140, 158, 138, 177, 133, 218,  92, 178, 209, 176, 213, 153,\n",
       "       204, 159])"
      ]
     },
     "execution_count": 371,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond0 = np.array(data[:,:,[1]]) == 0\n",
    "index0 = np.argwhere(cond0)\n",
    "ijk0 = []\n",
    "for l,m,n in index0:\n",
    "    ijk0.append(data[l,m,n])\n",
    "arr0 = np.array(ijk0)\n",
    "arr0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 372,
   "id": "0796a7dd",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "253"
      ]
     },
     "execution_count": 372,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 男生最大值\n",
    "arr0.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 373,
   "id": "8eed10e1",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "39"
      ]
     },
     "execution_count": 373,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 男生最小值\n",
    "arr0.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 374,
   "id": "7617abf2",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "142.2344827586207"
      ]
     },
     "execution_count": 374,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 男生平均值\n",
    "arr0.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 376,
   "id": "477b65a5",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "139.0"
      ]
     },
     "execution_count": 376,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 男生中位数\n",
    "np.median(arr0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 377,
   "id": "c5d2767e",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "46.412247758257095"
      ]
     },
     "execution_count": 377,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 男生标准差\n",
    "arr0.std()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eb1337d8",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
